package jn.cdz.rabbit.mq.sender;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TopicSender {
    @Autowired
    private AmqpTemplate rabbitTemplate;

    public void send() {
        String context = "hello_topic ";
        System.out.println("Sender : " + context);
        this.rabbitTemplate.convertAndSend("topic", "topic.messagesz", context);
    }
}
